package xyz.zhno.project.user.client.facade;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import xyz.zhno.project.commons.core.dto.Result;

/**
 * 用户服务调用接口
 * @author zh_o
 * @date 2020-11-01
 */
@FeignClient("service-user")
public interface UserClient {

    /**
     * 根据 id 获取用户
     * @param id 传入用户id
     * @return 用户信息
     */
    @GetMapping("/user/get/{id}")
    ResponseEntity<Result> getUser(@PathVariable("id") Integer id);

}
